package com.scuec.groupfive.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;

@Mapper
public interface PostLikeMapper {
    @Select("SELECT COUNT(*) FROM post_likes")
    int getTotalLikeCount();

    @Select("SELECT COUNT(*) FROM post_likes WHERE created_at BETWEEN #{startDate} AND #{endDate}")
    int getLikeCountByDateRange(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
}